package com.example.zhish.explore_demo001;

import android.app.Activity;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhish on 2016/4/15.
 */
public class Global {
    //获取屏幕的宽度与高度
    public static int GLOBAL_WEIGHT;
    public static int GLOBAL_HEIGHT;
    public static Map<String, Integer> images;


    public static void global_init(Activity a) {
        GLOBAL_HEIGHT = a.getWindowManager().getDefaultDisplay().getHeight();
        GLOBAL_WEIGHT = a.getWindowManager().getDefaultDisplay().getWidth();

        images = new HashMap<>();
        images.put("close_dir", R.drawable.close_dir);
        images.put("open_dir", R.drawable.open_dir);
        images.put("mp3", R.drawable.mp3_file);
        images.put("mp4", R.drawable.mp4_file);
        images.put("txt", R.drawable.txt_file);
        images.put("jpg", R.drawable.image_file);
        images.put("bmp", R.drawable.image_file);
        images.put("png", R.drawable.image_file);
        images.put("gif", R.drawable.image_file);
        images.put("unKonw",R.drawable.unknown_file);
    }
}
